@extends('home.layout.base')
<link rel="stylesheet" href="{{URL::asset('./css/store/servicedetails.css')}}">

@section('content')
@include('home.store.storeHeader')
<div class="details" id="casesDetails">
    <div class="details_left">
        <div class="detailsTitle">
            @{{storeCaseDetails.title}}
        </div>
        <div class="detailsContent" v-html="storeCaseDetails.content">
        </div>
        <a :href="'{{route('home.store.storeCases')}}?id='+storeId">
            < 返回案例列表</a> </div> <div class="details_right">
                <div class="recommendStore" v-for="(item,index) in rightStoreListData" v-if="index<1">
                    <div class="recommendStore_header">
                        <img :src="item.logo">
                    </div>
                    <div class="recommendStore_main">
                        <div class="nameS">
                            <span>@{{item.store_name}}</span>
                            <img src="{{URL::asset('./img/store/storeListColloct.png')}}" v-if="item.quality==2">
                            <img src="{{URL::asset('./img/store/storeListHot.png')}}" v-if="item.hot==2">
                        </div>
                        <div class="grade">
                            <!-- 评分率：<img v-for="(item,index) in 5" src="{{URL::asset('./img/store/xingxing.png')}}"> -->
                            好评率：@{{item.credit}}%
                        </div>
                    </div>
                    <div class="recommendStore_button">
                        <button @click.stop="item.bool=true">
                            联系TA
                            <div class="listButtonDialog" v-show="item.bool" @click.stop="item.bool=false">
                                <div class="listButtonDialog_img">
                                    <span>
                                        <img src="{{URL::asset('./img/store/listButtonDialog_img.png')}}" alt="">
                                        @{{item.master_phone}}
                                    </span>
                                    <p class="listButtonDialog_name"> @{{item.master_name}}</p>
                                    <!-- <p class="listButtonDialog_tel">
                                    电话接通率：<a>
                                        100%
                                    </a>
                                </p> -->
                                </div>
                                <div class="listButtonDialog_QRcode">
                                    <img src="{{URL::asset('./img/store/dialogTelbigQR.png')}}" alt="">
                                    <span>扫码快速拨打电话</span>
                                    <a>X</a>
                                </div>
                            </div>
                        </button>
                        <button @click="window.location.href = '{{ route('home.store.store') }}?id='+item.id">
                            进入店铺
                        </button>
                    </div>
                </div>
                <div class="publicityImg" v-for="(item,index) in advsData" v-if="index<1">
                    <a :href="item.link">
                        <img :src="item.thumb">
                    </a>
                </div>
    </div>
</div>
@endsection
@section('scripts')
<script>
    $(() => {
        let app = new Vue({
            el: '#casesDetails',
            data: () => {
                return {
                    storeId: getQueryString('id'),
                    caseId: getQueryString('caseId'),
                    storeCaseDetails: {},
                    advsData: [],
                    rightStoreListData: [],
                }
            },
            created() {

                let storeDetailData = {
                    id: this.caseId
                }
                apiAjax("{{ route('home.store.casesDetailsApi')}}", 'get', storeDetailData, (res) => {
                    if (res.code == 0) {
                        this.storeCaseDetails = res.data;
                    } else {}
                }, (erro) => {});
                apiAjax("{{ route('home.store.rightStoreApi') }}", 'get', {}, (res) => {
                    if (res.code == 0) {
                        this.rightStoreListData = res.data;
                    } else {
                        this.$message({
                            message: res.msg,
                            type: 'warning'
                        });
                    }
                }, (erro) => {});
                apiAjax("{{ route('home.public.advs') }}", 'get', {
                    adsense_id: 10
                }, (res) => {
                    if (res.code == 0) {
                        this.advsData = res.data;
                    } else {
                        this.$message({
                            message: res.msg,
                            type: 'warning'
                        });
                    }
                }, (erro) => {});
            },
            mounted() {},
            methods: {

            }
        })
    })
</script>
@endsection